package com.ahcloud.edas.common.kafka;

import lombok.Data;
import org.springframework.boot.autoconfigure.kafka.KafkaProperties;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * @program: kafka-enhance
 * @description:
 * @author: YuKai Fan
 * @create: 2024/4/20 12:22
 **/
@Data
@ConfigurationProperties(prefix = "kafka.enhance")
public class KafkaEnhanceProperties {

    /**
     * kafka集群地址
     */
    private List<String> bootstrapServers = new ArrayList<>(Collections.singletonList("localhost:9092"));

    /**
     * 客户端id
     */
    private String clientId;

    /**
     * 生产者配置
     */
    private KafkaProperties.Producer producer = new KafkaProperties.Producer();

    /**
     * 消费者配置
     */
    private KafkaProperties.Consumer consumer = new KafkaProperties.Consumer();

    /**
     * 监听器配置
     */
    private final KafkaProperties.Listener listener = new KafkaProperties.Listener();

    /**
     * SSL配置
     */
    private final KafkaProperties.Ssl ssl = new KafkaProperties.Ssl();

    /**
     * 安全协议配置
     */
    private final KafkaProperties.Security security = new KafkaProperties.Security();

    /**
     * kafka管理员配置
     */
    private final KafkaProperties.Admin admin = new KafkaProperties.Admin();

    /**
     * kafka stream配置
     */
    private final KafkaProperties.Streams streams = new KafkaProperties.Streams();
}
